﻿@model Peninsula.DataAccess.POCO.Admin



@section Styles{
    @Styles.Render(BundleConfig.BootstrapUploadCssBundle)
    <style type="text/css">
    </style>
}
@section Scripts{
    @Scripts.Render(BundleConfig.BootstrapUploadJsBundle)
    <script type="text/javascript">
        $(function () {
        });
    </script>
}


<!-- BEGIN FORM PORTLET -->
<div class="portlet">
    <div class="portlet-title">
        <div class="caption">
            <i class="fa fa-reorder"></i>账户设置
        </div>
    </div>
    <div class="portlet-body form">

        @using (Html.BeginForm("MyProfile", "Account", FormMethod.Post,
                        new { @class = "form-horizontal js-form js-ajax-form", enctype = "multipart/form-data", id = "fileupload" }))
        {
            @Html.AntiForgeryToken()
            @Html.HiddenFor(m => m.Id)
            <div class="form-body">
                <div class="form-group">
                    <label class="control-label col-md-3">选择头像</label>
                    <div class="col-md-9">
                        @Html.Partial("_BootstrapFileUploadImg",
                            new ViewDataDictionary() {
                                {"name","FaceImg" },
                                {"oriUrl",Url.Content(Model.FaceImgPath??"~/images/user_default_face.png") },
                            }
                        )
                    </div>

                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span style="color:red">*</span> @Html.DisplayNameFor(m => m.UserName)
                    </label>
                    <div class="col-md-7">
                        <p class="form-control-static">
                            @Model.UserName
                            @Html.HiddenFor(m => m.UserName)
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span style="color:red">*</span>  @Html.DisplayNameFor(m => m.TrueName)
                    </label>
                    <div class="col-md-7">
                        @Html.TextBoxFor(m => m.TrueName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.TrueName)
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span style="color:red">*</span>  @Html.DisplayNameFor(m => m.Email)
                    </label>
                    <div class="col-md-7">
                        @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Email)
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        <span style="color:red">*</span>  @Html.DisplayNameFor(m => m.Phone)
                    </label>
                    <div class="col-md-7">
                        @Html.TextBoxFor(m => m.Phone, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Phone)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-3 col-md-7">
                        @Html.ValidationSummary()
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        @Html.DisplayNameFor(m => m.Password)
                    </label>
                    <div class="col-md-7">
                        <input type="password" id="Password" name="Password" class="form-control" />
                        @*@Html.ValidationMessageFor(m => m.Password)*@
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">
                        新密码
                    </label>
                    <div class="col-md-7">
                        <input placeholder="如果不修改密码请留空" type="password" id="NewPassword" name="NewPassword" class="form-control" />
                        @*@Html.ValidationMessageFor(m => m.Password)*@
                    </div>
                </div>
            </div>
            <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                    <button type="submit" class="btn btn-success">保存</button>
                    <a href="@HttpContext.Current.Request.UrlReferrer" class="btn btn-default">取消</a>
                </div>
            </div>
        }

    </div>
</div>